﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Web4Comment.Service
{
    public interface ITimeService
    {
        /// <summary>
        /// 开始时间
        /// </summary>
        /// <param name="userid">用户id</param>
        /// <param name="start_time">开始时间</param>
        /// <param name="type_1">1.好友交流;2.浏览新闻;3.维护个人信息</param>
        /// <param name="type_2">1.好友id;2.新闻id;3.没有意义</param>
        /// <returns>timeid</returns>
        long logStartTime(int userid, DateTime start_time, int type_1, int type_2);

        /// <summary>
        /// 结束时间
        /// </summary>
        /// <param name="timeid"></param>
        /// <param name="end_time"></param>
        /// <returns></returns>
        bool logEndTime(long timeid, DateTime end_time);

        /// <summary>
        /// 计算时间
        /// </summary>
        /// <param name="userid">用户id</param>
        /// <param name="type_1">1.好友交流;2.浏览新闻;3.维护个人信息</param>
        /// <param name="type_2">1.好友id;2.新闻id;3.没有意义</param>
        /// <returns></returns>
        TimeSpan calculateTime(int userid, int type_1, int type_2);

        /// <summary>
        /// 计算单一时间
        /// </summary>
        /// <param name="timeid">时间id</param>
        /// <returns></returns>
        TimeSpan calculateSingleTime(long timeid);
    }
}
